package com.lc.user.express.httpserver;

import com.lc.user.express.model.AddrModel;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.List;

/**
 * Created by Administrator on 2016/4/1.添加银行卡
 */
@HttpInlet(Net.GET_BANK_ADD)
public class GetBankCardAdd extends ZJDBAsyGet<Object> {
    public String userid,name,bankcard,banktype,mobile,paypwd;

    public GetBankCardAdd(String userid,String name,String bankcard,String banktype,String mobile,String paypwd, AsyCallBack listener) {
        super(listener);
        this.userid = userid;
        this.name = name;
        this.bankcard = bankcard;
        this.banktype = banktype;
        this.mobile = mobile;
        this.paypwd = paypwd;
    }

    @Override
    protected Object parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            TOAST = "设置银行卡成功";
            return "1";
        } else if(object.optInt("message") == 2){
            TOAST = "银行卡只能设置一张";
        }{
            TOAST = "设置银行卡失败";
        }
        return null;
    }

}
